Problem: function GenerateIntegers() { var len, integers; do { // generate random list of numbers len = KhanUtil.randRange( 5, 10 ); integers = []; for (var i = 0; i < len; i++) { integers[i] = KhanUtil.randRange( 1, 10 ); } } while ( !KhanUtil.mode(integers) ); return integers; } function DisplayMedian( sortedInts ) { var si = sortedInts.slice(0), center = Math.floor( si.length / 2 ), prepend = "\\boldsymbol{", append = "}"; if ( si.length % 2 == 0 ) { si[center] = prepend + si[center] + append; si[center - 1] = prepend + si[center - 1] + append; } else { si[center] = prepend + si[center] + append; } return si.join( ", " ); } What is the mode of the following numbers? $9, 7, 6, 6, 6, 8, 8, 4, 6, 2$
The mode is the most frequent number. We can draw a histogram to see how many times each number appears. ${0}$ ${1}$ ${2}$ ${3}$ ${4}$ ${5}$ ${6}$ ${7}$ ${8}$ ${9}$ ${10}$ There are more $6$ s than any other number, so $6$ is the mode.